<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #main{
            width: 500px;
            height: 500px;
        }
    </style>
</head>

<body>
    <!-- 构建数据容器 -->
    <div id="main"></div>

    <script src="//s.yezgea02.com/1609305532675/echarts.js"></script>
    <script>
        // 正常节点的获取
        let chardom = document.querySelector('#main')
        // 转化为echarts的对象节点
        let mychart = echarts.init(chardom)
        // 数据的配置
        let option;
        option = {
            xAxis: {
                type: 'category',
                data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
            },
            yAxis: {
                type: 'value'
            },
            series: [
                {
                    data: [150, 230, 224, 218, 135, 147, 260],
                    type: 'line'
                }
            ]
        }
    //数据和节点进行结合
     option&&mychart.setOption(option)

    </script>
</body>

</html>